<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page import="beans.*,java.util.List" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<jsp:useBean id="pizzaDB" class="beans.PizzaDB" scope="page">
	<jsp:setProperty name="pizzaDB" property="database" 
		value="${applicationScope.DAOPizza}"/>
</jsp:useBean>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Liste des pizzas</title>
</head>
<body>
	<table>
		<tr>
			<th>Id pizza</th>
			<th>Nom pizza</th>
			<th>Prix pizza</th>
		</tr>
		
		<c:forEach var="pizza" begin="0" items="${pizzaDB.pizzas}">
			<tr>
				<td>${pizza.id}</td>
				<td>${pizza.nom}</td>
				<td>${pizza.prix}</td>
			</tr>
		</c:forEach>
	</table>
</body>
</html>